package com.dao;

import java.util.List;
import com.bean.Users;
import com.util.Page;

public interface UsersDAO {
	void save(Users transientInstance);
	void saveBatch(List entities)throws Exception;
	void delete(Users persistentInstance);
	void deleteBatch(List entities);
	Users findById(java.lang.Integer id);
	List findByExample(Users instance);
	List findByProperty(String propertyName, Object value);
	List findByUsername(Object username);
	List findByPassword(Object password);
	List<Users> findAll(Page page);
	List findUser(String username,String password);
	List findByQuery(Users user,Page page);
    Users merge(Users detachedInstance);//此方法为先save一条记录，然后query出来
	void attachDirty(Users instance);
	void attachClean(Users instance);
}
